package com.amado.course17bothwayNode;
/**
 * 单向节点
 * @author Administrator
 *
 */
public class Node {
	/**
	 * 编码唯一，不能重复
	 */
	private String code;
	/**
	 * 名称
	 */
	private String name;
	/**
	 * 下一个节点
	 */
	private Node next;
	/**
	 * 上一个节点
	 */
	private Node previous;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Node getNext() {
		return next;
	}
	public void setNext(Node next) {
		this.next = next;
	}
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	
	public Node getPrevious() {
		return previous;
	}
	public void setPrevious(Node previous) {
		this.previous = previous;
	}
	public Node(String code, String name) {
		super();
		this.code = code;
		this.name = name;
	}
	
	
}
